#include<stdio.h>
int main(){
    int n,k;
    while(scanf("%d",&n) && n!=0){
        k=0;
        if(n<=3){
            printf("1\n");
        }else{
            while(n/2!=0){
                k++;
                n=n/2;
            }
            printf("%d\n",k);
        }
    }
    return 0;
}